#@adminLayout()
#define main()
<div class="card">
    <div class="card-block">
        <h2 class="card-title">系统设置</h2>
        <div class="progress">
            <div class="progress-bar bg-success" role="progressbar" style="width: 100%" aria-valuenow="100"
                 aria-valuemin="0"
                 aria-valuemax="100"></div>
        </div>
        <br>
        <form id="jmisForm" action="/admin/sys/setting/saveOrUpdate" method="post">
            <div class="form-group has-success">
                <label class="form-control-label">系统名称</label>
                <input type="text" class="form-control form-control-success" value="#(model.name??)"
                       name="setting.name"
                       placeholder="请填写系统名称 eg:JMIS后台管理">
                <i class="form-group__bar"></i>
            </div>
            <div class="form-group has-success">
                <label class="form-control-label">所属权</label>
                <input type="text" class="form-control form-control-success"
                       value="#(model.ownership??)" name="setting.ownership"
                       placeholder="请填写系统所属权 eg:©2019 成都凯能光电科技有限公司. All rights reserved.">
                <i class="form-group__bar"></i>
            </div>
            <div class="form-group has-success">
                <label class="form-control-label">备案信息</label>
                <input type="text" class="form-control form-control-success"
                       value="#(model.filing??)" name="setting.filing" placeholder="请填写系统备案信息 eg:蜀ICP备19033174号-1">
                <i class="form-group__bar"></i>
            </div>
            <br>
            <div class="has-success">
                <button class="btn btn-secondary btn--icon-text waves-effect"><i class="zmdi zmdi-check"></i> 保存
                </button>
            </div>
            <br>
        </form>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#jmisForm").ajaxForm({
            dataType: "json"
            , beforeSubmit: function (formData, jqForm, options) {
            }
            , success: function (ret) {
                if (ret.state == "ok") {
                    showMsg(0, ret.msg);
                    $("#setting").html(ret.setting.name)
                    $("#ownershipFiling").html(ret.setting.ownership + "&emsp;" + ret.setting.filing);
                    $.pjax({url: "/admin/sys/setting", container: '#pjax-container'});
                } else {
                    showMsg(3, ret.msg)
                }
            }
            , error: function (ret) {
                showMsg(3, ret.statusText)
            }
            , complete: function (ret) {
            }
        });
    });
</script>
#end
